<span style="text-align: center;"><h1>Welcome back <%= @user.given_name %></h1></span>
<p>&nbsp;</p>

<% if current_user.role == 'PDAdmin' %>
	<p><%= link_to 'Display a User Report', :controller => 'reports', :action => 'user' %></p>
	<p><%= link_to 'Display Summary Report', :controller => 'reports', :action => 'summary' %> (processor intensive!)</p>
<% elsif current_user.role == 'PDUser' %>
	<h2>Your Attended and Upcoming Sessions - <%= current_user.pdsessions.sum(:duration, :conditions => { :start_lt => Time.now }) %> hrs completed</h2>
	<%= render :partial => "pdsessions/pdtable_start" %>
	<% @pdsessions.each do |pdsession| %>
			<%= render :partial => "pdsessions/pdsession_summary",
				:locals => { :pdsession => pdsession, :link_text => "Drop Out", :link_action => "destroy" }%>
	<% end %>
	<%= render :partial => "pdsessions/pdtable_end" %>
	
	<h2>Your Goals:</h2>
	<span style="text-align: center;">
		<p><%= render :partial => "goal", :locals => { :user => @user } %></p>
	</span>
<% end %>



